package com.xiaohuihui.springbootes.springbootes.dao;

import com.xiaohuihui.springbootes.springbootes.entity.UserEntity;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;


public interface EsTestDao extends ElasticsearchRepository<UserEntity,String> {

    List<UserEntity> findUserEntityByUsername(String username);

    List<UserEntity> findUserEntityBySex(String sex);

    UserEntity save(UserEntity userEntity);

    List<UserEntity> findUserEntityByUsernameOrPassword(String keyword1, String keyword2, Pageable pageable);

    List<UserEntity> findUserEntitiesByPasswordContains(String keyword);

    List<UserEntity> findFirstBySex(String keyword);
}
